<!--<script type="text/javascript" src="../../includes/js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
tinymce.init({
    selector: "textarea",
    plugins: [
        "advlist autolink lists link image charmap print preview anchor",
        "searchreplace visualblocks code fullscreen",
        "insertdatetime media table contextmenu paste moxiemanager"
    ],
    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
});
</script>-->
<?php if(!defined('GbIncl2')){?>
<meta http-equiv="refresh" content="0;url=../spm-itats/block.php" />
<?php }else{ ?>
	<?php
	$_GET['tentang']=isset($_GET['tentang']) ? $_GET['tentang'] :'';
	$_GET['set']=isset($_GET['set']) ? $_GET['set'] :'';
	if ($_SESSION['JABATAN']=='1'){?>
    <div class="section">
    <ul class="nice-list">
    	<li> 
            <?php if ($_GET['tentang']=='visi'){ echo "<a href=?setting=tentang&amp;tentang=visi>"?><b>VISI</b></a> |
            <?php }else{ echo "<a href=?setting=tentang&amp;tentang=visi>"?>VISI</a> |
            <?php }?>
            <?php if ($_GET['tentang']=='misi'){ echo "<a href=?setting=tentang&amp;tentang=misi>"?><b>MISI</b></a> |
            <?php }else{ echo "<a href=?setting=tentang&amp;tentang=misi>"?>MISI</a> |
            <?php }?>
            <?php if ($_GET['tentang']=='sejarah'){ echo "<a href=?setting=tentang&amp;tentang=sejarah>"?><b>SEJARAH</b></a> |
            <?php }else{ echo "<a href=?setting=tentang&amp;tentang=sejarah>"?>SEJARAH</a> |
            <?php }?>
            <?php if ($_GET['tentang']=='struk-org'){ echo "<a href=?setting=tentang&amp;tentang=struk-org>"?><b>STRUKTUR ORGANISASI</b></a>
            <?php }else{ echo "<a href=?setting=tentang&amp;tentang=struk-org>"?>STRUKTUR ORGANISASI</a>
            <?php }?>
        </li>
         <?php //AWAL FORM INSERT//?>
        <?php 
        if ($_GET['tentang']=='visi'){
			$visi="select * from dkb_spm where ID_PARENTDS=5 and ID_DS=1 limit 1";
			$visi=mysql_query($visi) or die (mysql_error());
			$data1=mysql_fetch_object($visi);
			$visi=$data1->LINK_DS;
		}else if ($_GET['tentang']=='misi'){
			$misi="select * from dkb_spm where ID_PARENTDS=5 and ID_DS=2 limit 1";
			$misi=mysql_query($misi) or die (mysql_error());
			$data2=mysql_fetch_object($misi);
			$misi=$data2->LINK_DS;
		}else if ($_GET['tentang']=='sejarah'){
			$sejarah="select * from dkb_spm where ID_PARENTDS=5 and ID_DS=3 limit 1";
			$sejarah=mysql_query($sejarah) or die (mysql_error());
			$data3=mysql_fetch_object($sejarah);
			$sejarah=$data3->LINK_DS;
		}else if ($_GET['tentang']=='struk-org'){
			$strukorg="select * from dkb_spm where ID_PARENTDS=5 and ID_DS=4 limit 1";
			$strukorg=mysql_query($strukorg) or die (mysql_error());
			$data4=mysql_fetch_object($strukorg);
			$strukorg=$data4->LINK_DS;
		} else { ?>
        	<meta http-equiv="refresh" content="0;url=../cpanel/?setting=tentang&amp;tentang=visi" />
       	<?php }	?>
        <form id="f_s_tentang" name="f_s_tentang" method="post" action="">
          <table width="100%" border="2">
            <tr>
              <th scope="row" width="10%"><label for="t_t_isi">ISIAN</label></th>
              <th  width="90%"><textarea name="t_t_isi" id="t_t_isi" class="textarea" cols="100%" rows="20" autofocus="autofocus"><?php 
				if ($_GET['tentang']=='visi'){
				echo $visi;}
				else if ($_GET['tentang']=='misi'){
				echo $misi;}
				else if ($_GET['tentang']=='sejarah'){
				echo $sejarah;}
				else if ($_GET['tentang']=='struk-org'){
				echo $strukorg;}
				?></textarea>
              </th>
            </tr>
            <tr>
              <th scope="row">&nbsp;</th>
              <th class="left"><input type="submit" name="submit" id="b_d_insert" class="button" value="Simpan" /></th>
            </tr>
          </table>
        </form>
        <?php //AKHIR FORM INSERT//?>
		
        
        <?php 
        if (isset($_POST['t_t_isi'])and $_GET['tentang']=='visi'){
		$updatetentang = "UPDATE DKB_SPM SET LINK_DS = '$_POST[t_t_isi]' WHERE ID_PARENTDS=5 AND ID_DS=1";
		$hasilupdatetentang = mysql_query($updatetentang);
			if ($hasilupdatetentang){
				 echo "<p>Proses Update Sukses .</p>";
				 ?><meta http-equiv="refresh" content="0;url='../cpanel/?setting=tentang&amp;tentang=visi'"><?php
			}else echo "<p>Proses Update Gagal</p>";
		
		}else
		if (isset($_POST['t_t_isi'])and $_GET['tentang']=='misi'){
		$updatetentang = "UPDATE DKB_SPM SET LINK_DS = '$_POST[t_t_isi]' WHERE ID_PARENTDS=5 AND ID_DS=2";
		$hasilupdatetentang = mysql_query($updatetentang);
			if ($hasilupdatetentang){
				 echo "<p>Proses Update Sukses .</p>";
				 ?><meta http-equiv="refresh" content="0;url='../cpanel/?setting=tentang&amp;tentang=misi'"><?php
			}else echo "<p>Proses Update Gagal</p>";
		
		}else
		if (isset($_POST['t_t_isi'])and $_GET['tentang']=='sejarah'){
		$updatetentang = "UPDATE DKB_SPM SET LINK_DS = '$_POST[t_t_isi]' WHERE ID_PARENTDS=5 AND ID_DS=3";
		$hasilupdatetentang = mysql_query($updatetentang);
			if ($hasilupdatetentang){
				 echo "<p>Proses Update Sukses .</p>";
				 ?><meta http-equiv="refresh" content="0;url='../cpanel/?setting=tentang&amp;tentang=sejarah'"><?php
			}else echo "<p>Proses Update Gagal</p>";
		
		}else
		if (isset($_POST['t_t_isi'])and $_GET['tentang']=='struk-org'){
		$updatetentang = "UPDATE DKB_SPM SET LINK_DS = '$_POST[t_t_isi]' WHERE ID_PARENTDS=5 AND ID_DS=4";
		$hasilupdatetentang = mysql_query($updatetentang);
		if ($hasilupdatetentang){
				 echo "<p>Proses Update Sukses .</p>";
				 ?><meta http-equiv="refresh" content="0;url='../cpanel/?setting=tentang&amp;tentang=struk-org'"><?php
			}else echo "<p>Proses Update Gagal</p>";
		}
		
		?>
    </ul>
    </div>
<?php } else {?>
	<meta http-equiv="refresh" content="0;url=/spm-itats/cpanel/block.php" />
<?php }?>
<?php }?>

<?php
/*

*/
?>